<!DOCTYPE html>
<html>
  <head>
    <title>
      audiosummingjunction-crash.html
    </title>
    <script src="../../resources/testharness.js"></script>
    <script src="../../resources/testharnessreport.js"></script>
    <script src="../resources/audit.js"></script>
  </head>
  <body>
    <script id="layout-test-code">
      let audit = Audit.createTaskRunner();

      audit.define(
          {
            label: 'test',
            description:
                'Test connection from ChannelMerger to MediaStreamAudioDestination'
          },
          (task, should) => {
            let context = new AudioContext();
            let node = context.createChannelMerger(4);
            node.connect(context.createMediaStreamDestination(), 0);
            gc();
            // Test passes if we get here because we didn't crash
            should(true, 'Test survived GC')
                .message('correctly', 'incorrectly');
            task.done();
          });

      audit.run();
    </script>
  </body>
</html>
